package com.yuefan;

import jdk.jfr.DataAmount;

/**
 * 水果
 */

public class Fruit {
    private String type; //水果种类
    private double weight; //重量
    private double price; //价格
    private double discount; //折扣
    public double getAmountPrice() {
        return weight * price * discount;
    }

    public Fruit() {
    }

    public Fruit(String type, double weight, double price, double discount) {
        this.type = type;
        this.weight = weight;
        this.price = price;
        this.discount = discount;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public double getDiscount() {
        return discount;
    }

    public void setDiscount(double discount) {
        this.discount = discount;
    }
}
